package ds.dsr.controller;
import ds.dsr.utils.IpUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author sunchong
 * @date 2018/4/26
 */
@RestController
public class CommonController {

    @GetMapping("/")
    public String defaultIndex(HttpServletRequest request){
        String ip = IpUtil.getIp(request);
        return "<h1 style=\"margin: 0 auto; font-size: 32px; text-align: center; height: 500px; line-height:500px\">Welcome "+ip+" goto Service Center</h1>";
    }

}
